 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenStreetMapNetwork
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                if (args.Length < 2)
                {
                    System.Console.WriteLine("Usage: " + System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName + " <file in> <file out>");
                    return;
                }


                Network r = new Network();
                r.Load(args[0]);
                r.Export(args[1]);

                System.Console.WriteLine("Wrote simplified network to: " + args[1]);

            }
            catch (Exception ex)
            {
                System.Console.WriteLine("Something went wrong...");
                System.Console.WriteLine("Exception details: " + ex.ToString());
            }
        }
    }
}
